<?php include show_tpl('public_uheader.htm'); ?>

<div style="width:100%; height:20px; background:#E9ECF3;"></div>

<?php include show_tpl('public_usider.htm'); ?>

<div id="page-wrapper" class="gray-bg">

	<div class="row wrapper wrapper-content">
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">
							<em class="fa fa-list"></em>
							修改密码
						</div>
					</div>
					<div class="panel-body">
						<div class="content-box">
						修改登陆密码
							<form class="form-ajax form-horizontal" action="<?php echo url('user-password'); ?>" method="post">
								<input type="hidden" name="pwd_type" value="0"> 
								<div class="form-group">
									<label class="col-md-2 control-label">原登陆密码：</label>
									<div class="col-lg-6">
										<input type="password" name="pwd1" class="form-control"> 
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">新登陆密码：</label>
									<div class="col-lg-6">
										<input type="password" name="pwd2" class="form-control"> 
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">确认新登陆密码：</label>
									<div class="col-lg-6">
										<input type="password" name="pwd3" class="form-control"> 
									</div>
								</div>
								<div class="form-group">
									<div class="col-md-offset-2 col-md-6">
										<button type="submit" class="btn btn-success submit">
											&nbsp;<i class="fa fa-check-square-o"></i>&nbsp;
											修改登陆密码&nbsp;
										</button>
									</div>
								</div>
							</form>
							
							修改提款密码
							<form class="form-ajax form-horizontal" action="<?php echo url('user-password'); ?>" method="post">
								<input type="hidden" name="pwd_type" value="1"> 
								<div class="form-group">
									<label class="col-md-2 control-label">原提款密码：</label><span style="color:red ">初始提款密码就是你的登录密码</span>
									<div class="col-lg-6">
										<input type="password" name="pwd1" class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">新提款密码：</label>
									<div class="col-lg-6">
										<input type="password" name="pwd2" class="form-control"> 
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label">确认新提款密码：</label>
									<div class="col-lg-6">
										<input type="password" name="pwd3" class="form-control"> 
									</div>
								</div>
								<div class="form-group">
									<div class="col-md-offset-2 col-md-6">
										<button type="submit" class="btn btn-success submit">
											&nbsp;<i class="fa fa-check-square-o"></i>&nbsp;
											修改提款密码&nbsp;
										</button>
									</div>
								</div>
							</form>
							
						</div>
					</div>  
				</div>
			</div>
		</div>
	</div>
</div>

<?php include show_tpl('public_ufooter.htm'); ?>

<script>
	$('.submit').click(function(){
		var jbtn=$(this);		
		jbtn.attr('disabled', '1');
		var jfrom=jbtn.closest('form');
		var postdata = jfrom.serialize();
		$.post(jfrom.attr('action'), postdata, function(message){
			alert(message.message);
			if(message.code==1) window.location.reload();
			jbtn.attr('disabled', false);
		}, 'json');
		return false;
	});
</script>